package com.hc;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@SpringBootApplication
public class ConfigrationApplication {
	
	@Autowired
	private AppliactionProperties appliactionProperties;
	
	@Autowired
	private SafeConfigrationProperties safeConfigrationProperties;
	
	@GetMapping("/")
	public String test() {
		System.out.println(appliactionProperties.getName() + "----" + appliactionProperties.getAge() + "---" + safeConfigrationProperties.getPhone());
		return "test";
	}

	public static void main(String[] args) {
		SpringApplication.run(ConfigrationApplication.class, args);
	}

}
